package cn.edu.ujn.project.supermarket.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.ujn.project.common.core.text.Convert;
import cn.edu.ujn.project.supermarket.domain.DealReport;
import cn.edu.ujn.project.supermarket.mapper.DealReportMapper;
import cn.edu.ujn.project.supermarket.service.IDealReportService;

/**
 * 处理记录Service业务层处理
 * 
 * @author kkk
 * @date 2023-11-13
 */
@Service
public class DealReportServiceImpl implements IDealReportService 
{
    @Autowired
    private DealReportMapper dealReportMapper;

    /**
     * 查询处理记录
     * 
     * @param dealId 处理记录主键
     * @return 处理记录
     */
    @Override
    public DealReport selectDealReportByDealId(String dealId)
    {
        return dealReportMapper.selectDealReportByDealId(dealId);
    }

    /**
     * 查询处理记录列表
     * 
     * @param dealReport 处理记录
     * @return 处理记录
     */
    @Override
    public List<DealReport> selectDealReportList(DealReport dealReport)
    {
        return dealReportMapper.selectDealReportList(dealReport);
    }

    /**
     * 新增处理记录
     * 
     * @param dealReport 处理记录
     * @return 结果
     */
    @Override
    public int insertDealReport(DealReport dealReport)
    {
        return dealReportMapper.insertDealReport(dealReport);
    }

    /**
     * 修改处理记录
     * 
     * @param dealReport 处理记录
     * @return 结果
     */
    @Override
    public int updateDealReport(DealReport dealReport)
    {
        return dealReportMapper.updateDealReport(dealReport);
    }

    /**
     * 批量删除处理记录
     * 
     * @param dealIds 需要删除的处理记录主键
     * @return 结果
     */
    @Override
    public int deleteDealReportByDealIds(String dealIds)
    {
        return dealReportMapper.deleteDealReportByDealIds(Convert.toStrArray(dealIds));
    }

    /**
     * 删除处理记录信息
     * 
     * @param dealId 处理记录主键
     * @return 结果
     */
    @Override
    public int deleteDealReportByDealId(String dealId)
    {
        return dealReportMapper.deleteDealReportByDealId(dealId);
    }
}
